package com.example.personal.aiagent.common.constant;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * 错误码
 */
@Getter
public enum ErrorCode {
    OK(0x00000000, ""),

    PARAM_ERROR(0x00000001, "param error"),

    UNAUTHORIZED(0x00000002, "unauthorized"),

    PARAM_ERROR_WITH_MESSAGE(0x00000003, "param error, {}"),

    LOGIN_USERNAME_PASSWORD_MISMATCH(0x00001001, "username or password incorrect"),

    USER_EXISTS(0x00002000, "user exists"),

    USER_NOT_EXIST(0x00002001, "user not exist"),

    UNKNOWN_USER(0x00002002, "chat internal error, unknown user"),

    ACCOUNT_EXISTS(0x00003000, "account exists"),

    ACCOUNT_NOT_EXIST(0x00003001, "account not exist"),

    CHAT_STATUS_INVALID(0x00004001, "chat status invalid, present status:{}, detail message:{}"),

    CHAT_INTERNAL_ERROR(0x00004002, "chat internal error, present status:{}, detail message:{}"),

    CHAT_ENTITY_NOT_FOUND(0x00004003, "chat entity not found"),

    SYSTEM_ERROR(0xffffffff, "system error");

    private final int errorCode;

    private final String errorMessage;

    ErrorCode(int errorCode, String errorMessage) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
}
